package com.example.services;

import com.example.sisko_app.R;
import com.example.sisko_app.R.string;

import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.util.Log;
import android.widget.Toast;

public class PhoneServices {
	//Startet einen Anruf aus der App heraus
	public void call(Activity Act, String Number){
		
		try {
			Log.w("Nummer", Number);
			Intent callIntent = new Intent(Intent.ACTION_CALL);
			callIntent.setData(Uri.parse("tel:"+Number));
			Act.startActivity(callIntent);
			
		} catch (Exception e) {
			 
			Toast.makeText(Act, R.string.phone_error, Toast.LENGTH_LONG).show();
		}
		
	}

}
